﻿function isNumber (o) {
    return isFinite(o);
}


function IsNull(data) {
    if (data === '' || data === undefined) {
        return false ;
    }
    else {
        return true;
    }
}

function updateTips(t) {
    $(".validateTips")
				.text(t)
				.addClass("ui-state-highlight");
    setTimeout(function () {
        tips.removeClass("ui-state-highlight", 1500);
    }, 500);
}
function checkLength(o, n, min, max) {
    if (o.val().length > max || o.val().length < min) {
        o.addClass("ui-state-error");
        updateTips("Length of " + n + " must be between " +
					min + " and " + max + ".");
        return false;
    } else {
        return true;
    }
}